import { request } from '@/utils/request'

// 附件list
export function fileList(param) {
  return request({
    url: '/fileCommon/list',
    method: 'post',
    showMessage: false,
    data: param,
  })
}

// 附件删除
export function fileDel(param) {
  return request({
    url: '/fileCommon/delete',
    method: 'post',
    showMessage: false,
    data: param,
  })
}

//获取附件名
export function getFileName(param) {
  return request({
    url: '/fileCommon/getFileName',
    method: 'post',
    showMessage: false,
    data: param,
  })
}

//附件下载
export function fileDownload(param) {
  return request({
    url: '/fileCommon/download',
    method: 'post',
    showMessage: false,
    data: param,
  })
}
//附件详情
export function fileDetail(param) {
  return request({
    url: '/fileCommon/detail',
    method: 'post',
    showMessage: false,
    data: param,
  })
}

//附件新增上传
export function fileAdd(param) {
  return request({
    url: '/fileCommon/add',
    method: 'post',
    showMessage: false,
    data: param,
    type: 1,
	showLoading:1,
  })
}

//附件更新上传
export function fileUpdata(param) {
  return request({
    url: '/fileCommon/update',
    method: 'post',
    showMessage: false,
    data: param,
    type: 1,
  })
}
